def isNan(a):
	try:
		float(a)
		return False
	except ValueError:
		pass
	return True;

chengji=[];
print("输入-1则停止输入");
count=1;
while True:
	print('请输入第',count,end='');
	feng=input('个成绩：');
	while feng[0]=='-' or isNan(feng):
		if(feng=='-1'):break;
		print('您输入的成绩不是一个大于0的数字，请重新输入第',count,end='');
		feng=input('个成绩：');
	if(feng=='-1'):break;
	chengji.append(float(feng));
	count=count+1;
	
if(chengji==[]):print('您没有输入任何成绩！');
else:
	print('平均分：',sum(chengji)/len(chengji));
	print('最高分：',max(chengji));
	print('最低分：',min(chengji));


